﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class DataInterface_SaleDataUpLoad : System.Web.UI.Page
{
    protected void Page_PreInit(object sender, EventArgs e)
    {
        Page.Theme = BLL.Common.GetWSMThemes();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        //Check.CheckPermission("800100");
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        DataSet ds = new BLL.ORDERDOC().OC_Order_SaleStat();
        int aa = ds.Tables[0].Rows.Count;
        string OrderList = "";
        string ExitList = "";
        string key = System.Configuration.ConfigurationSettings.AppSettings["CODE"].ToString();
        if (aa > 0)
        {
            LX_Manage.ERP.Service sv = new LX_Manage.ERP.Service();

            int res = sv.SaleStat(key, ds);
            if (res > 0)
            {
                Share.InsertLog("800200", "00006");
                Share.Alert(Page, "上传成功");
            }
            else
            {
                Share.Alert(Page, "上传失败");
            }
        }
        else
        {
            Share.Alert(Page, "无上传数据");
        }
    }
}
